package com.ecr.hub.util;

public class WagonUtils {

	public static String formatExtId(String extId) {

		StringBuffer sb = new StringBuffer();
		if (extId != null && extId.trim().length() == 12) {
			try {
				sb.append(extId.substring(0, 2)).append(" ");
				sb.append(extId.substring(2, 4)).append(" ");
				sb.append(extId.substring(4, 7)).append(" ");
				sb.append(extId.substring(7, 11)).append(" ");
				sb.append(extId.substring(11, 12));
				return sb.toString();
			} catch (Exception e) {
				return extId;
			}
		}
		return extId;
	}
}
